home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
tex-k
/
tex-eplain-archive
/
000004_gisli@timoshen….eecs.umich.edu_Sun Apr 10 10:52:14 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1995-01-08
|
3KB
Received: from liapunov.eecs.umich.edu ([141.212.98.118]) by cs.umb.edu with SMTP id AA22511
(5.65c/IDA-1.4.4 for <tex-eplain@cs.umb.edu>); Sun, 10 Apr 1994 14:59:30 -0400
Received: from timoshenko.eecs.umich.edu by liapunov.eecs.umich.edu (NX5.67d/NX3.0M)
id AA03157; Sun, 10 Apr 94 14:52:15 -0400
Received: by timoshenko.eecs.umich.edu (NX5.67d/NX3.0S)
id AA03093; Sun, 10 Apr 94 14:52:14 -0400
Date: Sun, 10 Apr 94 14:52:14 -0400
From: Gisli Ottarsson <gisli@timoshenko.eecs.umich.edu>
Message-Id: <9404101852.AA03093@timoshenko.eecs.umich.edu>
To: tex-eplain@cs.umb.edu
In-Reply-To: <9404101547.AA05322@cs.rice.edu> (dorai@cs.rice.edu)
Subject: Re: adding indexing to eplain
>>>>> On Sun, 10 Apr 94 10:47:06 CDT, dorai@cs.rice.edu (Dorai Sitaram) said:
DS> Have y'all considered adding indexing to eplain?
I am very interested in this topic. Karl (Mr. Berry?) was nice enough
to send me his preliminary ideas for extensions to eplain, that
included some indexing features. Alas, I had a time constraint that
prevented me from understanding and adopting his macros so I have been
making use of idxmac.tex + "enhancements".
DS> Right now, I find I get neat indexes by \input'ing idxmac.tex
DS> (available on CTAN).
I was less happy with straight idxmac.tex. I found that I was unable
to use \index it in all the places I liked (I think it had problems
with ignoring spaces). I borrowed from eplain and rolled this:
\newif\if@idxfileopened
\newwrite\idxfile
\let\idxfilebasename = \jobname
\def\openidxfile{%
\if@idxfileopened\else
\global\@idxfileopenedtrue
\immediate\openout\idxfile = \idxfilebasename.idx
\fi
}%
\newif\ifrewriteidxfile \rewriteidxfiletrue
\def\readidxfile{%
\testfileexistence[\idxfilebasename]{idx}%
\if@fileexists
\input \idxfilebasename.idx
\ifrewriteidxfile \openidxfile \fi
\fi
}%
\def\index#1{%
\ifrewriteidxfile
\openidxfile
\toks0 = {\expandafter\noexpand \csname indexentry\endcsname}%
\def\temp{#1}%
\edef\@wr{%
\write\idxfile{%
\the\toks0
{\sanitize\temp}%
{\noexpand\folio}%
}%
}%
\@wr
\fi
\ignorespaces
}%
Needless to say I don't have a clue what half of this means,
but I found that as long as I leave a space before \index
I get the proper .idx file for makeindex.
I too think that I nice interface to makeindex would be a nice
addition to the eplain arsenal.
Thanks for eplain
Gisli
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Gisli Ottarsson
Grad Student and a Gentleman
Delenda est Carthago.
University of Michigan
gisli@umich.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~